<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/3/17
 * Time: 14:06
 */

echo "<title>10-5 获取字符串的长度</title>";
echo "<p style='text-align: center'><a href=\"index.php\"><font size=\"4\">目录</font></a></p>";
header("Content-type: text/html; charset=utf-8");
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";

//获取字符串长度
$str = "我爱你";
echo mb_strlen($str,"UTF8"); //结果：3
echo "<br/>";

$love = 'I love you';
strlen($love);
